/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package verins.beans;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author hectdx
 */
@Entity
@Table(name = "log", schema = "verinscribe")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Log.findAll", query = "SELECT l FROM Log l"),
    @NamedQuery(name = "Log.findByIdentradalog", query = "SELECT l FROM Log l WHERE l.identradalog = :identradalog"),
    @NamedQuery(name = "Log.findByIdusuario", query = "SELECT l FROM Log l WHERE l.idusuario = :idusuario"),
    @NamedQuery(name = "Log.findByIdprocesoelectoral", query = "SELECT l FROM Log l WHERE l.idprocesoelectoral = :idprocesoelectoral"),
    @NamedQuery(name = "Log.findByTipo", query = "SELECT l FROM Log l WHERE l.tipo = :tipo"),
    @NamedQuery(name = "Log.findBySubtipo", query = "SELECT l FROM Log l WHERE l.subtipo = :subtipo"),
    @NamedQuery(name = "Log.findByDescripcion", query = "SELECT l FROM Log l WHERE l.descripcion = :descripcion"),
    @NamedQuery(name = "Log.findByFecha", query = "SELECT l FROM Log l WHERE l.fecha = :fecha")})
public class Log implements Serializable {
    @Column(name = "fecha")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecha;
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(generator="verinscribe.log_identradalog_seq",strategy=GenerationType.IDENTITY)
    @Column(name = "identradalog", nullable = false)
    private Integer identradalog;
    @Column(name = "idusuario")
    private Integer idusuario;
    @Column(name = "idprocesoelectoral")
    private Integer idprocesoelectoral;
    @Column(name = "tipo", length = 50)
    private String tipo;
    @Basic(optional = false)
    @Column(name = "subtipo",  length = 50)
    private String subtipo;
    @Column(name = "descripcion", length = 100)
    private String descripcion;

    public Log() {
    }

    public Log(Integer identradalog) {
        this.identradalog = identradalog;
    }

    public Log(Integer identradalog, String subtipo, Date fecha) {
        this.identradalog = identradalog;
        this.subtipo = subtipo;
        this.fecha = fecha;
    }

    public Integer getIdentradalog() {
        return identradalog;
    }

    public void setIdentradalog(Integer identradalog) {
        this.identradalog = identradalog;
    }

    public Integer getIdusuario() {
        return idusuario;
    }

    public void setIdusuario(Integer idusuario) {
        this.idusuario = idusuario;
    }

    public Integer getIdprocesoelectoral() {
        return idprocesoelectoral;
    }

    public void setIdprocesoelectoral(Integer idprocesoelectoral) {
        this.idprocesoelectoral = idprocesoelectoral;
    }

    public String getTipo() {
        return tipo;
    }

    public void setTipo(String tipo) {
        this.tipo = tipo;
    }

    public String getSubtipo() {
        return subtipo;
    }

    public void setSubtipo(String subtipo) {
        this.subtipo = subtipo;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (identradalog != null ? identradalog.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Log)) {
            return false;
        }
        Log other = (Log) object;
        if ((this.identradalog == null && other.identradalog != null) || (this.identradalog != null && !this.identradalog.equals(other.identradalog))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "verins.beans.Log[ identradalog=" + identradalog + " ]";
    }

    public Date getFecha() {
        return fecha;
    }

    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }
    
}
